from insts.inst import Index8Instruction


class INCR(Index8Instruction):
    def __init__(self, opcode):
        super().__init__(opcode)
        self.num = 0

    def execute(self, frame):
        localVars = frame.getLocalVars()
        var = localVars.getInt(index=self.index)
        var += 1
        localVars.setInt(index=self.index, value=var)
